package org.jeecg.common.modules.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.ss.formula.functions.T;
import org.jeecg.common.modules.order.entity.OrderInfo;
import org.jeecg.common.modules.order.entity.PayOrder;
import org.jeecg.common.modules.order.vo.OrderInfoReqVo;
import org.jeecg.common.util.enums.ShopTypeEnum;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Description: order
 * @Author: jeecg-boot
 * @Date:   2020-08-26
 * @Version: V1.0
 */
public interface IOrderInfoService extends IService<OrderInfo> {

    /**
     * 查询医生视频条数
     * @param doctorId
     * @param shopType
     * @return
     */
    int countByDoctorIdAndType(String doctorId, ShopTypeEnum shopType);

    /**
     * 获取用户的订单信息
     * @param wxUserinfoId
     * @return
     */
    List<OrderInfo> getOrderInfo(String wxUserinfoId);
    List<OrderInfo> getOrderInfo(String wxUserinfoId,Integer status,Integer type);

    /**
     * 创建一条新订单
     * @param payOrder
     * @return
     */
    OrderInfo initOrder(PayOrder payOrder);

    /**
     * 查询订单信息
     * @param id
     * @param status
     * @param userName
     * @param doctorName
     * @param dataStart
     * @param pageSize
     * @return
     */
    List<OrderInfoReqVo> getOrderPageInfos(String id,Integer status,String userName, String doctorName, Integer dataStart, Integer pageSize);

    /**
     * 查询订单的总条数
     * @param id
     * @param status
     * @param userName
     * @param doctorName
     * @return
     */
    int getCount(String id,Integer status,String userName,String doctorName);

    /**
     * 查看医生患者是否有正在进行订单
     * @param doctorId
     * @param wxUserinfoId
     * @param shopType
     * @return
     */
    boolean isDoing(String doctorId,String wxUserinfoId,Integer shopType);

    /**
     * excel数据导出
     * @param ids
     * @return
     */
    List<OrderInfoReqVo> excelOrderInfo(List<String> ids);
}
